#ifndef _SYSTEM_H_
#define _SYSTEM_H_

#include "stm8s_conf.h"
#include "Sample_Thread.h"
#include "TimeOut.h"

#define True 			1
#define False			0
#define DemoMode	0
#define Die_Debug		1
#define Func_Enable 0


/*************************************************************/
#define Key_SwTimeOutValue				500
#define Key_SwTimeOutCheckValue		495
#define TimeDelayValue					100
#define TimeDelayValue1					5
#define EnableReflashMaxValue			600

#define Delay200us				200
#define Delay100us				100

#define Delay10ms				10

#define TIM1_Prescaler_8        7
#define Tim1_Period_10MS            10000
/*************************************************************/
#ifdef Sys_Global
#define SYS_EXT 
#else
#define SYS_EXT extern
#endif


typedef enum
{
	SleepMode=0,
	WorkMode
}
SYSWORK_STS;

typedef struct
{
	spthd sp_thd;
	SYSWORK_STS SysWork_Sts;
	TIMEOUT_PARA timer;
}
SYSTEM_PARA;

/**********************GPIO_Defined**********************************************/

void system_init(void);
unsigned char System_Handler(SYSTEM_PARA * System_Para);



/********************Function Defined****************************************************/


#endif
